import request from '@/utils/request'

// 获取项目列表
export function projectList(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/findGroupProjectList.html',
    method: 'post',
    data: query
  })
}

// 获取项目详情
export function projectDetail(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/findGroupByProjectId.html',
    method: 'post',
    data: query
  })
}

// 获取项目详情
export function getProjectDetail(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/getGroupProjectDetail.html',
    method: 'post',
    data: query
  })
}

// 获取项目图片
export function getProjectImg(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupOrderProvider/1.0.0/listGroupOrderUpgradeImg.html',
    method: 'post',
    data: query
  })
}

// 添加项目
export function addProject(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/addGroupProject.html',
    method: 'post',
    data: query
  })
}

// 删除项目
export function deleteProject(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/delGroupByProjectId.html',
    method: 'post',
    data: query
  })
}

// 修改项目
export function updateProject(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/updateGroupProject.html',
    method: 'post',
    data: query
  })
}

// 查询项目团购状态
export function projectGroupStatus(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/queryGroupStatusByProjectId.html',
    method: 'post',
    data: query
  })
}

// 修改项目上架状态
export function updateProjectStatus(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/updateGroupStatusByProjectId.html',
    method: 'post',
    data: query
  })
}

// 修改项目上架状态
export function updateProjectIsRecommend(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/updateGroupRecommendByProjectId.html',
    method: 'post',
    data: query
  })
}

// 修改项目是否推送到服务端小程序
export function updateProjectServerShow(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/updateServerShowByProjectId.html',
    method: 'post',
    data: query
  })
}

// 获取省份对应项目（下拉框）
export function provinceProject(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/groupProjectDropDownWithPermission.html',
    method: 'post',
    data: query
  })
}

// 批量复制项目
export function batchCopyGroupProjectList(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/batchCopyGroupProjectList.html',
    method: 'post',
    data: query
  })
}
// 批量修改项目字段数据（医院id）
export function batchUpdateProjectHospital(query) {
  return request({
    url: '/com.mmk.groupservice.api.AdminGroupProjectProvider/1.0.0/batchUpdateProjectHospital.html',
    method: 'post',
    data: query
  })
}